package guoanmaker.operator.business.model;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import guoanmaker.operator.helper.common.abstractobj.IdEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 
* @ClassName: PersonalUser 
* @Description: C端用户表
* @author Yvonne_MGL
* @date 2017年7月6日 下午3:21:41 
*  
 */

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@JsonIgnoreProperties(value={"trademarks"})
@Table(name="t_personal_user")//t_personal_user
public class PersonalUser extends IdEntity implements  Serializable{

	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/*
	private String portrait;//头像存储地址
	private String portraitName;//头像名称
	private String weibouuid;//微博uuid
	private String wechatopenid;//微信openid
	private String qqopenid;//qq openid
	private String wechatnickname;//微信昵称
	private String qqnickname;//qq昵称
	private String weibonickname;//微博昵称
	private String wechatportrait;//微信头像存储地址
	private String qqportrait;//qq头像存储地址
	private String weiboportrait;//微博头像存储地址
	private String wechatportraitN;//微信头像名称
	private String qqportraitN;//qq头像名称
	private String weiboportraitN;//微博头像名称
	private String thirdtype;//登录类型
	private String wechat;//微信账号
	private String qq;//qq账号
	private String weibo;//微博账号
	private String jpushid;//推送id
	private String jpushAlias;//推送别名
	*/
	


	private String username;//用户名(手机号)
	private String password;//密码
	private Date createTime;//注册时间
	private String nickname;//昵称
	private String birthday;//生日
	private String name;//名字
	private String email;//邮箱
	private String remark;//备注
	private String isProvider;//是否成为了服务商,0为未申请,1为已申请,2为已成为,3为审核失败,4为被冻结
	private Date applyForProviderTime;//申请时间
	private String isFreeze;//是否被冻结 1为被冻结
	private String wechat;//微信账号
	private String qq;//qq账号
	private String weibo;//微博账号
	private String portrait;//头像存储地址
	private String portraitName;//头像名称
	
	@OneToMany(mappedBy="user",fetch=FetchType.LAZY,cascade={CascadeType.ALL})
	//@JSONField(serialize=false)
    private Set<ProvideOrderForm> orderforms;
	private int wrongBout;//验证失败次数
	private Date wrongTime;//最后一次验证错误时间
	private Date isProviderTime;//成为服务商的时间
	private String createType;//注册方式  1为PC     2为APP
	private String channelSource;//渠道来源   1今日头条客户端    2网易新闻客户端    3搜狗引擎      4360引擎
	private String recusername;//邀请人账号
	@OneToMany(mappedBy="user",fetch=FetchType.LAZY,cascade={CascadeType.ALL})
	private Set<PatentQueryRecord> patentQueryRecords = new HashSet<>();

	@JsonIgnore
	@OneToMany(mappedBy="user",fetch=FetchType.LAZY,cascade={CascadeType.ALL})
	private Set<OperatorTrademarkSearchLog> trademarks;
	
	@JsonIgnore
	@OneToMany(mappedBy="user",fetch=FetchType.LAZY,cascade={CascadeType.ALL})
	private Set<OperatorContractDownloadLog> downloadLogs;
}
